package com.wing.visual.dao;

import com.wing.visual.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 采购可视化
 *
 * @author xiayang
 */
@Mapper
public interface PurchaseDao {

    /**
     * 年度采购总金额
     *
     * @return
     */
    BigDecimal purchaseAmountTotalByYear();

    /**
     * 月度采购总金额
     *
     * @return
     */
    BigDecimal purchaseAmountTotalByMonth();

    /**
     * 新增采购数量
     *
     * @return
     */
    Integer addPurchaseNumTotal(@Param("params") Map<String, Object> params);

    /**
     * 签收金额
     *
     * @return
     */
    BigDecimal signAmountTotal(@Param("params") Map<String, Object> params);

    /**
     * 新增采购订单数
     *
     * @return
     */
    Integer addPurchaseOrderNumTotal(@Param("params") Map<String, Object> params);

    /**
     * 签收物料数量
     *
     * @return
     */
    Integer signMaterialNumTotal(@Param("params") Map<String, Object> params);

    /**
     * 订单进度-采购数量
     *
     * @return
     */
    List<PurchaseOrderRate> purchaseOrderRateByPurchase(@Param("params") Map<String, Object> params);

    /**
     * 订单进度-签收数量
     *
     * @return
     */
    List<PurchaseOrderRate> purchaseOrderRateBySign(@Param("params") Map<String, Object> params);

    /**
     * 采购订单类型金额统计
     *
     * @return
     */
    List<PurchaseTypeAmountTotal> purchaseOrderTypeAmountTotal(@Param("params") Map<String, Object> params);

    /**
     * 供应商采购订单金额统计
     *
     * @return
     */
    List<SupplierPurchaseAmountTotal> supplierPurchaseAmountTotal(@Param("params") Map<String, Object> params);

    /**
     * 采购金额曲线图
     *
     * @return
     */
    List<PurchaseOrderAmount> purchaseOrderAmountGraph();


    /**
     * 采购订单物料统计-采购量
     *
     * @return
     */
    List<PurchaseMaterialTotal> materialTotalByPurchaseNum(@Param("params") Map<String, Object> params);

    /**
     * 采购订单物料统计-签收数
     *
     * @return
     */
    List<PurchaseMaterialTotal> materialTotalBySignNum(@Param("params") Map<String, Object> params);


}
